package com.earthchen.hbase.hos.core.user.domain;

import com.earthchen.hbase.hos.core.util.CoreUtil;

import java.util.Date;

/**
 * 用户信息实体
 *
 * @author: EarthChen
 * @date: 2018/07/31
 */
public class UserInfo {

    private String userId;

    private String username;

    private String password;

    private String detail;

    private SysRole sysRole;

    private Date createTime;

    public UserInfo() {
    }

    public UserInfo(String username, String password, String detail, SysRole sysRole) {
        this.userId = CoreUtil.getUUIDStr();
        this.username = username;
        this.password = CoreUtil.getMdPassword(password);
        this.detail = detail;
        this.sysRole = sysRole;
        this.createTime = new Date();
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getDetail() {
        return detail;
    }

    public void setDetail(String detail) {
        this.detail = detail;
    }

    public SysRole getSysRole() {
        return sysRole;
    }

    public void setSysRole(SysRole sysRole) {
        this.sysRole = sysRole;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}
